(when (not (= (vector-length command-line-arguments) 1))
   (display "Usage: monos -f projection.scm generator-file\n")
   (exit))

(let* ((file (vector-ref command-line-arguments 0))
       (uri (file->uri file))
       (ideal (unmarshall (parse-xml-from-uri->document uri)) ) )
   (do ((i (dimension (lex-order-ref ideal)) (- i 1)) ) ((= i 0) #f)
       (write ideal)
       (newline)
       (unless (= i 1)
          (set! ideal (monomial-tree->monomial-ideal (project-tree (monomial-ideal->monomial-tree ideal))))) ) )


